Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add import-export options for sidebar filters #1856

Merged

Conversation

sudeeptarlekar
Copy link
Collaborator

Add ability to import and export all filters, Charts from sidebar. At the moment user can still export all filters from history in toolbar but to enhance the accessibility this PR add same feature in sidebar.

Fixes: #1833

Add ability to import and export all filters, Charts from sidebar.
At the moment user can still export all filters from history in
toolbar but to enhance the accessibility this PR add same feature
in sidebar.

Fixes: esrlabs#1833
@sudeeptarlekar sudeeptarlekar marked this pull request as ready for review July 27, 2023 09:21
@sudeeptarlekar
Copy link
Collaborator Author

Hello @DmitryAstafyev can you please review?

Thanks in advance

@DmitryAstafyev
Copy link
Collaborator

In general also in case of an error (import/export) we should inform the user about it. Search via solution be new Notification( to find necessary API

Comment on lines 512 to 513
public contextMenuOptions(items: IMenuItem[]): IMenuItem[] {
const historySession = history.get(this.session);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if return isn't used, it should return void; and name probably should be something like injectGeneralMenuItems. Or if it returns something, it should be getGeneralMenuItems.

Comment on lines 534 to 535
protected filters(historySession: HistorySession): { import(): void; export(): void } {
return {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method logAndNotifyError can be present as arrow-function here (as soon as it's used only in this scope)

const logAndNotifyError = () => {...};
return {...}

Comment on lines 578 to 579
protected logAndNotifyError(error: any): void {
this.logger.error(error.message);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to reduce from any on client and do not use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add export/import filters to menu
2 participants